<style>
.talks{
	clear:both;
	overflow:auto;
}
hr{
	margin:30px 0 10px 0;
	border:0px; border-top:1px solid #CECECE;
}
</style>

<div class="article">
	<div class="title"><?php echo $article['title']?></div>
	<div class="title2"><?php echo date('Y/m/d H:i', $article['pubtime'])?></div>
	<div class="content"><p><?php echo str_replace("\n",'<br>',$article['content'])?></p></div>
	
	<hr/>
	
	<h4>用户谈论</h4>
	<div class="talks">
		<table border=0 align='left' width='80%' cellpadding=10>
		<col width="160"></col>
		<col></col>
<?php if($talks) foreach($talks as $t) {?>
		<tr>
			<td valign='top'>
				<a href="<?php echo url('user/uid/'.$t['user']['uid'])?>"><?php echo $t['user']['name'] ? $t['user']['name'] : $t['user']['username']?></a>
				<?php echo date('y/m/d H:i', $t['addtime'])?>
			</td>
			<td valign='top'><?php echo $t['content']?></td>
		</tr>
<?php } ?>
		</table>
	</div>
	
	<h4>参与谈论</h4>
	<div class="talk_form">
<?php if(!empty($_SESSION['USER'])) {?>
	<form method='post' action='<?php echo url("art-talk/id/{$_GET['id']}")?>'>
		<div><textarea rows="3" cols="40" name="content"></textarea></div>
		<input type="submit" value="提交发言" />
	</form>
<?php }else{ ?>
		<span>登陆后方可参与谈论，<a href="<?php echo url('user-login')?>">点此登陆</a></span>
<?php }?>
	</div>
	
</div>
